//
// Created by wuzhe on 2022/4/18.
//

#ifndef UNIVERSEROOM_PLAYERSTATE_H
#define UNIVERSEROOM_PLAYERSTATE_H

#include "../Player.hh"
enum class PLAYER_STATUS {
    OFFLINE = 0,
    ONLINE = 1,
    FIRST_LOGIN = 2,
    IN_ROOM =3,
};
/**
 * 玩家状态机
 */
class PlayerState {
protected:
    Player& player;
public:
    explicit PlayerState(Player& player1, PLAYER_STATUS playerStatus);
    virtual PlayerState* getAck();
    virtual PlayerState* getERR();
    virtual PlayerState* getEnter();
    virtual PlayerState* getExit();
    virtual PlayerState* getCreateRoom(std::string roomName);
    virtual PlayerState *getEnterRoom(int i);
    virtual PlayerState* getDelRoom();
    virtual PlayerState *getExitRoom(int i);
    virtual PlayerState* getCreateRole(std::string roleName);
    virtual PlayerState *getTalk(std::string);
    // 玩家状态
    PLAYER_STATUS playerStatus;
};


#endif //UNIVERSEROOM_PLAYERSTATE_H
